import request from '@/utils/request'
//查询业主关联区域市场下线路/区间/站点树
export function getPlanLineSectionSiteStateTreeByLike(param) {
    return request({
		// rest/projectManage/getGCWBLineSiteNode
        url: 'rest/projectManage/getGCWBLineSiteNode',
        method: 'post',
        data: param
    })
}
//修改巡检状态
export function inspectLogUpdateState(param) {
    return request({
        url: 'rest/inspectLog/updateState',
        method: 'post',
        data: param
    })
}
//获取上次填报记录
export function getLastFillingRecord(param) {
    return request({
        url: 'rest/inspectLog/getLastFillingRecord',
        method: 'post',
        data: param
    })
}
//病害列表
export function diseaseOrderGetList(param) {
    return request({
        url: 'rest/diseaseOrder/getList',
        method: 'post',
        data: param
    })
}
//病害工单详情
export function diseaseOrderGetDetails(param) {
    return request({
        url: 'rest/diseaseOrder/getDetails',
        method: 'post',
        data: param
    })
}
//病害现状列表
export function diseaseStatusList(param) {
    return request({
        url: 'rest/diseaseStandardLibrary/list',
        method: 'post',
        data: param
    })
}
//病害关键字
export function diseaseKeywordsList(param) {
    return request({
        url: 'rest/diseaseKeywords/list',
        method: 'post',
        data: param
    })
}

//新增/修改/变更病害工单
export function diseaseOrderSave(param) {
    return request({
        url: 'rest/diseaseOrder/save',
        method: 'post',
        data: param
    })
}
//病害审核
export function diseaseOrderReview(param) {
    return request({
        url: 'rest/diseaseOrder/review',
        method: 'post',
        data: param
    })
}
//待维修列表
export function repairOrderRepairList(param) {
    return request({
        url: 'rest/repairOrder/repairList',
        method: 'post',
        data: param
    })
}

//病害派单
export function diseaseDispatchOrder(param) {
    return request({
        url: 'rest/repairOrder/diseaseDispatch',
        method: 'post',
        data: param
    })
}
//已派单详情
export function getDispatchDetail(param) {
    return request({
        url: 'rest/repairOrder/getDispatchDetail',
        method: 'post',
        data: param
    })
}

//施工班组
export function getConstructionTeam(param) {
    return request({
        url: 'rest/projectUser/getConstructionTeam',
        method: 'post',
        data: param
    })
}
//维修工单撤销
export function revokeOrder(param) {
    return request({
        url: 'rest/repairOrder/revokeOrder',
        method: 'post',
        data: param
    })
}

//病害等级
export function diseaseGradeList(param) {
    return request({
        url: 'rest/diseaseGrade/list',
        method: 'post',
        data: param
    })
}
export const cacheDiseaseGradeList = 'cacheDiseaseGradeList'

//根据病害等级获取病害内容
export function getDiseaseContent(param) {
    return request({
        url: 'rest/diseaseStandardLibrary/getDiseaseContent',
        method: 'post',
        data: param
    })
}

export const cacheDiseaseContent = 'cacheDiseaseContent'

//获取区间站点下的所有详情
export function getDetailsList(param) {
    return request({
        url: 'rest/diseaseOrder/getDetailsList',
        method: 'post',
        data: param
    })
}

//物料描述(修复措施)
export function diseaseMaterialList(param) {
    return request({
        url: 'rest/diseaseMaterial/list', // 物料描述
        method: 'post',
        data: param
    })
}
export const cacheDiseaseOrderLog = 'cacheDiseaseOrderLog'


/** 综合整治大修（质安管理每日交底） */
export function getProjectListByMaintenance(param) {
    return request({
        url: 'rest/projectManagement/getPmListItemListByOrgIds',
        method: 'post',
        data: param
    })
}

/** 工程维保（质安管理每日交底） */
export function getProjectListByOverhaul(param) {
    return request({
        url: 'rest/projectManage/list',
        method: 'post',
        data: param
    })
}

/** 区间站点 */
export function getIntervalSiteList(param) {
    return request({
        url: 'rest/lineSection/publicSecurityNodeTree',
        method: 'post',
        data: param
    })
}

/** 安全监管人员（每日交底） */
export function getSafetySupervisorList(param) {
    return request({
        url: 'rest/person/getSafetyPerson',
        method: 'post',
        data: param
    })
}

/** 保存每日交底 */
export function saveFilleport(param) {
    return request({
        url: 'rest/dailyPreShiftBriefing/save',
        method: 'post',
        data: param
    })
}

export function constructionPlan_save(param) {
    return request({
        url: 'rest/constructionPlan/save',
        method: 'post',
        data: param
    })
}
export function constructionPlan_list(param) {
    return request({
        url: 'rest/constructionPlan/list',
        method: 'post',
        data: param
    })
}
export function constructionPlan_get(param) {
    return request({
        url: 'rest/constructionPlan/get',
        method: 'post',
        data: param
    })
}

export function constructionPlan_delete(param) {
    return request({
        url: 'rest/constructionPlan/delete',
        method: 'post',
        data: param
    })
}

/** 统计未上传的需填报记录数量 */
export function getFillRecordNotUploadCount(param) {
    return request({
        url: 'rest/dailyPreShiftBriefing/isSecurityStatusCount',
        method: 'post',
        data: param
    })
}

/** 获取填报记录列表 */
export function getFillRecordList(param) {
    return request({
        url: 'rest/dailyPreShiftBriefing/list',
        method: 'post',
        data: param
    })
}
/** 根据环号查询里程 */
export function getCalculateMileageLoop(param) {
    return request({
        url: 'rest/lineSection/getCalculateMileageLoop',
        method: 'post',
        data: param
    })
}

/** 根据环号查询里程   新 */
export function lineSectionGet(param) {
    return request({
        url: 'rest/lineSection/get',
        method: 'post',
        data: param
    })
}

export function constructionPlan_cancel(param) {
    return request({
        url: 'rest/constructionPlan/cancel',
        method: 'post',
        data: param
    })
}

export function planRingNumber_selectByPlanWorkloadId(param) {
    return request({
        url: 'rest/planRingNumber/selectByPlanWorkloadId',
        method: 'post',
        data: param
    })
}